#!/usr/bin/env bash

yum install -y nfs-utils

[ ! -d /data ] && mkdir /data

cat > /etc/exports <<EOF
/data 192.168.20.0/24(rw,sync,all_squash)
EOF

chown -R nfsnobody.nfsnobody /data

/etc/init.d/rpcbind restart
/etc/init.d/nfs restart

chkconfig rpcbind on
chkconfig nfs on
